@class-prefix-checkbox: ~'adm-checkbox';

.@{class-prefix-checkbox} {
  --icon-size: 22px;
  --font-size: var(--adm-font-size-9);
  --gap: 8px;
  display: inline-flex;
  vertical-align: text-bottom;
  justify-content: flex-start;
  align-items: center;
  cursor: pointer;
  input {
    display: none;
  }
  .@{class-prefix-checkbox}-icon {
    flex: none;
    border: 1px solid var(--adm-color-light);
    border-radius: var(--icon-size);
    box-sizing: border-box;
    width: var(--icon-size);
    height: var(--icon-size);
    color: var(--adm-color-text-light-solid);
    > svg {
      display: block;
      width: 100%;
      height: 100%;
    }
  }
  &.@{class-prefix-checkbox}-block {
    display: flex;
  }
  &.@{class-prefix-checkbox}-checked {
    .@{class-prefix-checkbox}-icon {
      border-color: var(--adm-color-primary);
      background-color: var(--adm-color-primary);
    }
  }
  &.@{class-prefix-checkbox}-disabled {
    cursor: not-allowed;
    .@{class-prefix-checkbox}-content {
      opacity: 0.4;
    }
    .@{class-prefix-checkbox}-icon.@{class-prefix-checkbox}-icon {
      color: var(--adm-color-light);
      border-color: var(--adm-color-light);
      background-color: var(--adm-color-fill-content);
    }
  }
  .@{class-prefix-checkbox}-custom-icon {
    font-size: var(--icon-size);
  }

  &.@{class-prefix-checkbox}-indeterminate {
    .@{class-prefix-checkbox}-icon {
      background-color: var(--adm-color-background);
      color: var(--adm-color-primary);
    }
  }

  &-content {
    flex: 0 1 auto;
    font-size: var(--font-size);
    padding-left: var(--gap);
  }
}
